package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IFpFaUserSaysayDao;
import com.financing.wap.dto.FpFaUserSaysayDTO;
/**
 * fp_fa_user_saysay  
 * FA人员说说 数据访问层实现类
 * @author lisu
 *
 */
 
@Repository("fpFaUserSaysayDao")
public class FpFaUserSaysayDaoImpl extends BaseDaoImpl<FpFaUserSaysayDTO, java.lang.Integer> implements IFpFaUserSaysayDao {


	@Override
	public int insert(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpFaUserSaysaySql.insert, fpFaUserSaysay);
	}

	@Override
	public void update(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserSaysaySql.update, fpFaUserSaysay);
	}

	@Override
	public void updateForce(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserSaysaySql.updateForce, fpFaUserSaysay);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserSaysaySql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpFaUserSaysayDTO> queryList(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpFaUserSaysaySql.queryList, fpFaUserSaysay);
	}

	@Override
	public int queryListCount(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpFaUserSaysaySql.queryListCount, fpFaUserSaysay);
	}

	@Override
	public FpFaUserSaysayDTO loadById(Integer id) throws SQLException {
		return  (FpFaUserSaysayDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpFaUserSaysaySql.loadById,id);
	}

	@Override
	public Class<FpFaUserSaysayDTO> getEntityClass() {
		return FpFaUserSaysayDTO.class;
	}
 	
}
